package com.bac.utils;

import android.content.Context;
import android.content.SharedPreferences;


/**
 * SharedPreferences
 * @author 
 *
 */
public class Storage {
	private static SharedPreferences getSharedPreferences(Context context) {
		SharedPreferences sharedPreferences = context.getSharedPreferences(
				"bacplatform", Context.MODE_PRIVATE);
		return sharedPreferences;
	}

	public static void saveString(Context context, String key, String value) {
		SharedPreferences sharedPreferences = getSharedPreferences(context);
		sharedPreferences.edit().putString(key, value).commit();
	}

	public static String getString(Context context, String key) {
		return getSharedPreferences(context).getString(key, "");
	}
	
	public static void deleteStringForKey(Context context, String key){
		getSharedPreferences(context).edit().remove(key).commit();
	}
}
